<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>${lotter.name }</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<link rel="stylesheet" href="/css/style.css" />
		<style type="text/css">
			.wf{margin: 20px 10px;}
			.wf div{margin-top: -28px;margin-left: 80px;}
			.wfbtn{padding: 5px 6px;margin-right: 7px;color:#136FAE;background: white;margin-bottom: 20px;}
			.wf span{background: #136FAE;padding: 8px 10px;border-radius:10px; color: white;margin-right: 10px;}
			.table1 tr td{height: 37px;padding:0 5px;color: white;font-size: 14px;}
			
			#zjxx tr *{font-size: 14px;color: white;}
			#zjxx tr td:nth-child(1){padding-left: 10px;} 
			#zjxx tr td:nth-child(2) span{color: orange;}
		</style>
	</head>
	<body style="background: #4F84CF;">
		<span id="id" class="hidden">${lotter.id }</span>
		<span id="cname" class="hidden">${lotter.cname }</span>
		<span class="lasttime hidden">${lotter.lottertime }</span>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="position: fixed;top: 0;height: 150px;z-index: 5;padding: 0px;background: #264F8C;">
			<img alt="" src="/img/caizhong/bg/bg.png" width="100%" height="150px;"/>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="padding: 10px 20px;position: fixed;top: 0;height: 130px;z-index: 10;">
			<div class="row">
				<div style="color: white;font-weight: bold;font-size: 20px;text-align: center;">${lotter.name } </div>
			
				<a onclick="back()" class="glyphicon glyphicon-chevron-left fl" style="color: white;margin-top: -30px;"></a>
				<a onclick="help('${lotter.helpurl}','${lotter.name }')" style="color: white;margin-top: -30px;" class="fr">购彩助手</a>
			</div>
			
			<img class="fr" alt="" src="/img/caizhong/${lotter.cname }.png" height="70px" width="70px" style="right: 10px;position: fixed;top: 40px;">
			<table class="row table1">
				<tr>
					<td>
						距 ${lotter.period+1 } 开奖 <span id="djs" style="font-size: 14px;font-weight: bold;color: yellow;"></span>
					</td>
				</tr>
				<tr>
					<td>
						第 <span style="font-size: 14px;">${lotter.period }</span> 期（上期）：
					</td>
				</tr>
				<tr>
					<td>
						<span class="lotternumber">${lotter.lotternumber }</span>
					</td>
				</tr>
			</table>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="padding:0px;padding-bottom: 10px; margin-top: 150px;">
			<!-- 正文开始 -->
			${str }
			<!-- 正文结束 -->
			<hr>
			　<span class="glyphicon glyphicon-tower" style="color: white;"></span>
			<strong style="color: white;"> 最新中奖纪录</strong>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" id="zjxx" style="z-index: -10;height: 200px;overflow: hidden;">
		<table style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);width: 100%;margin-top: -10px;">
			<tr>
				<td>woa*****</td>
				<td><span>喜中225元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中2940元</span></td>
				<td>购买重庆时时彩</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中490元</span></td>
				<td>购买幸运飞艇</td>
			</tr>
			<tr>
				<td>134*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>jup*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分PK10</td>
			</tr>
			<tr>
				<td>826*****</td>
				<td><span>喜中294元</span></td>
				<td>购买二分PK10</td>
			</tr>
			<tr>
				<td>dwy*****</td>
				<td><span>喜中146.25元</span></td>
				<td>购买幸运赛马</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中294元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>zx1*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>gc0*****</td>
				<td><span>喜中294元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>178*****</td>
				<td><span>喜中127.4元</span></td>
				<td>购买广东快乐10分</td>
			</tr>
			<tr>
				<td>138*****</td>
				<td><span>喜中294元</span></td>
				<td>购买安徽11选5</td>
			</tr>
			<tr>
				<td>yjd*****</td>
				<td><span>喜中196元</span></td>
				<td>购买排列三</td>
			</tr>
			<tr>
				<td>157*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>189*****</td>
				<td><span>喜中161.7元</span></td>
				<td>购买山东11选5</td>
			</tr>
			<tr>
				<td>443*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>133*****</td>
				<td><span>喜中196元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中294元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>499*****</td>
				<td><span>喜中176.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>931*****</td>
				<td><span>喜中254.8元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中235.2元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中519.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>155*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中245元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>z13*****</td>
				<td><span>喜中790.02元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>z13*****</td>
				<td><span>喜中394.02元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>175*****</td>
				<td><span>喜中137.2元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>155*****</td>
				<td><span>喜中470.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中392元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中940.8元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>woa*****</td>
				<td><span>喜中225元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中2940元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>134*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>jup*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>826*****</td>
				<td><span>喜中294元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>woa*****</td>
				<td><span>喜中225元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中2940元</span></td>
				<td>购买重庆时时彩</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中490元</span></td>
				<td>购买幸运飞艇</td>
			</tr>
			<tr>
				<td>134*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>jup*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分PK10</td>
			</tr>
			<tr>
				<td>826*****</td>
				<td><span>喜中294元</span></td>
				<td>购买二分PK10</td>
			</tr>
			<tr>
				<td>dwy*****</td>
				<td><span>喜中146.25元</span></td>
				<td>购买幸运赛马</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中294元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>zx1*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>gc0*****</td>
				<td><span>喜中294元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>178*****</td>
				<td><span>喜中127.4元</span></td>
				<td>购买广东快乐10分</td>
			</tr>
			<tr>
				<td>138*****</td>
				<td><span>喜中294元</span></td>
				<td>购买安徽11选5</td>
			</tr>
			<tr>
				<td>yjd*****</td>
				<td><span>喜中196元</span></td>
				<td>购买排列三</td>
			</tr>
			<tr>
				<td>157*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>189*****</td>
				<td><span>喜中161.7元</span></td>
				<td>购买山东11选5</td>
			</tr>
			<tr>
				<td>443*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>133*****</td>
				<td><span>喜中196元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>qcl*****</td>
				<td><span>喜中294元</span></td>
				<td>购买天津时时彩</td>
			</tr>
			<tr>
				<td>499*****</td>
				<td><span>喜中176.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>931*****</td>
				<td><span>喜中254.8元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中490元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中235.2元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中519.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>155*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中245元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中147元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>z13*****</td>
				<td><span>喜中790.02元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>z13*****</td>
				<td><span>喜中394.02元</span></td>
				<td>购买北京28</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>175*****</td>
				<td><span>喜中137.2元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>155*****</td>
				<td><span>喜中470.4元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>137*****</td>
				<td><span>喜中1960元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>150*****</td>
				<td><span>喜中392元</span></td>
				<td>购买二分PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中980元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中940.8元</span></td>
				<td>购买二分时时彩</td>
			</tr>
			<tr>
				<td>woa*****</td>
				<td><span>喜中225元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>135*****</td>
				<td><span>喜中2940元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td style="position: absolute;">qcl*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>134*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>jup*****</td>
				<td><span>喜中490元</span></td>
				<td>购买北京PK拾</td>
			</tr>
			<tr>
				<td>826*****</td>
				<td><span>喜中294元</span></td>
				<td>购买北京PK拾</td>
			</tr>
		</table>
	</div>
	</body>
	<script type="text/javascript">
		window.setInterval(function() {
			var x = Number($("#zjxx table").css("margin-top").replace("px", ""));
			if (x < -Number($("#zjxx table").css("width").replace("px", ""))) {
				$("#zjxx table").css("margin-top", "0px");
			} else {
				$("#zjxx table").css("margin-top", (x - 1) + "px");
			}
		}, 30)
		$(function(){
			$(".wf button").click(function(){
				window.location.href="/xz.do?id="+$("#id").text()+"&cname="+$("#cname").text()+"&key="+$(this).attr("class").replace("wfbtn btn ","");
			});
			qiu();
		});
		
		var dd=window.setInterval(function(){
			var time1 = new Date().format("hh:mm:ss").split(":");
			time1=Number(time1[0]*60*60)+Number(time1[1]*60)+Number(time1[2]);
			var time=$(".lasttime").text().split(" ")[1].split(":");
			time=Number(time[0]*60*60)+Number(time[1]*60)+Number(time[2]);
			time=time+Number($(".timespace").text())-time1;
			time--;
			var hour=Math.floor(time/3600);
			var minute=Math.floor((time-hour*3600)/60);
			var second=time-hour*3600-minute*60;
			if(time<0){
				/* clearInterval(dd); */
				$("#djs").text("正在开奖…");
				getnewdata();
			}else{
				$("#djs").text(bu0(hour)+":"+bu0(minute)+":"+bu0(second));
			}
		},1000);
		
		
		function qiu(){
			var lotternumber=$(".lotternumber").text().split(",");
			var lotter="";
			for(var i=0;i<lotternumber.length-1;i++){
 				lotter+=fenli(lotternumber[i]);
			}
			$(".lotternumber").html(lotter);
		}
		
		function getnewdata(){
			ajax({
				url:'/lotter/getnewdata.do',
				type:'post',
				data:{key:$("#cname").text()},
				success:function(data){
					var json=eval('('+data+')');
					if($(".xiaqi").text()==json.data.period){
						$(".lotternumber").text(json.data.lotternumber);
						$(".xiaqi").text(Number(json.data.period)+1);
						$(".period").text(json.data.period);
						$(".lasttime").text(json.data.lottertime);
						qiu();
					}
				},
				error:function(){
					alert("发生未知错误");
				}
			});
		}
		window.onload=function () {
			
		    document.addEventListener('touchstart',function (event) {
		        if(event.touches.length>1){
		            event.preventDefault();
		        }
		    })
		    var lastTouchEnd=0;
		    document.addEventListener('touchend',function (event) {
		        var now=(new Date()).getTime();
		        if(now-lastTouchEnd<=300){
		            event.preventDefault();
		        }
		        lastTouchEnd=now;
		    },false)
		}	
	</script>
</html>
